import { WeaOrgTree } from 'ecCom'
import { inject, observer } from 'mobx-react'
import { observable, action, toJS } from 'mobx'

@inject('meetingRoomPlan')
export default class LeftTab extends React.Component {
  constructor (props) {
    super(props)
  }
  
  clickTree = (t) => {
    if (t && t.node && t.node.props) {
      this.props.meetingRoomPlan.setOrg(t.node.props)
    }
  }
  
  render () {
    return (
      <WeaOrgTree ecId={`${this && this.props && this.props.ecId || ''}_WeaOrgTree@m2imo5`}
        treeNodeClick={this.clickTree}
        needSearch={true}
      />
    )
  }
}